/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.googlecode.jsimplemarket.model;

import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author Alexandru.Codescu
 */
@Entity
@Table(name = "cantare")
public class Cantar extends AbstractEntitate {
    private NStareCantar stareCantar;
    private String serie;
    private List<ObservatieCantar> observatii;
    private List<FisierAtasatCantar> fisierAtasatCantar;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "ID_STARE_CANTAR")
    public NStareCantar getStareCantar() {
        return stareCantar;
    }

    public void setStareCantar(NStareCantar stareCantar) {
        this.stareCantar = stareCantar;
    }

    @Column(name = "SERIE", length = 24)
    public String getSerie() {
        return serie;
    }

    public void setSerie(String serie) {
        this.serie = serie;
    }

    @OneToMany(fetch = FetchType.LAZY)
    @JoinColumn(name = "ID_CANTAR")
    public List<ObservatieCantar> getObservatii() {
        return observatii;
    }

    public void setObservatii(List<ObservatieCantar> observatii) {
        this.observatii = observatii;
    }

    @OneToMany(fetch = FetchType.LAZY)
    @JoinColumn(name = "ID_CANTAR")
    public List<FisierAtasatCantar> getFisierAtasatCantar() {
        return fisierAtasatCantar;
    }
    
    public void setFisierAtasatCantar(List<FisierAtasatCantar> fisierAtasatCantar) {
        this.fisierAtasatCantar = fisierAtasatCantar;
    }   
}
